﻿using B.S.DataBase.MyProject.ErrorCode;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using T.E.ERP.Read.API.Applicantions.Command.SalesCommand;
using T.E.ERP.Read.API.Dtos.Dtos;

namespace T.E.ERP.Read.API.Controllers
{
    /// <summary>
    /// 发货通知单控制器-读
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class DeliveryNoticeController : ControllerBase
    {
        private readonly IMediator mediator;

        public DeliveryNoticeController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 获取发货订单列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<APIResult<List<DeliveryDTO>>> GetDelivery([FromQuery]GetDeliveryNoticeCommand request)
        {
            return mediator.Send(request);
        }
    }
}
